home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIExternalProtocolService.idl < prev    next >
Text File  |  2006-05-08  |  4KB  |  105 lines

  1. /* -*- Mode: C++; tab-width: 3; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * ***** BEGIN LICENSE BLOCK *****
  4.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  5.  *
  6.  * The contents of this file are subject to the Mozilla Public License Version
  7.  * 1.1 (the "License"); you may not use this file except in compliance with
  8.  * the License. You may obtain a copy of the License at
  9.  * http://www.mozilla.org/MPL/
  10.  *
  11.  * Software distributed under the License is distributed on an "AS IS" basis,
  12.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  13.  * for the specific language governing rights and limitations under the
  14.  * License.
  15.  *
  16.  * The Original Code is the Mozilla browser.
  17.  *
  18.  * The Initial Developer of the Original Code is
  19.  * Netscape Communications, Inc.
  20.  * Portions created by the Initial Developer are Copyright (C) 1999
  21.  * the Initial Developer. All Rights Reserved.
  22.  *
  23.  * Contributor(s):
  24.  *   Scott MacGregor <mscott@netscape.com>
  25.  *
  26.  * Alternatively, the contents of this file may be used under the terms of
  27.  * either of the GNU General Public License Version 2 or later (the "GPL"),
  28.  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  29.  * in which case the provisions of the GPL or the LGPL are applicable instead
  30.  * of those above. If you wish to allow use of your version of this file only
  31.  * under the terms of either the GPL or the LGPL, and not to allow others to
  32.  * use your version of this file under the terms of the MPL, indicate your
  33.  * decision by deleting the provisions above and replace them with the notice
  34.  * and other provisions required by the GPL or the LGPL. If you do not delete
  35.  * the provisions above, a recipient may use your version of this file under
  36.  * the terms of any one of the MPL, the GPL or the LGPL.
  37.  *
  38.  * ***** END LICENSE BLOCK ***** */
  39.  
  40. #include "nsISupports.idl"
  41.  
  42. interface nsIURI;
  43. interface nsIFile;
  44. interface nsIPrompt;
  45.  
  46. /**
  47.  * The external protocol service is used for finding and launching
  48.  * platform specific applications for particular protocols.
  49.  *
  50.  * You can ask the external protocol service if it has an external
  51.  * handler for a given protocol scheme. And you can ask it to load 
  52.  * the url using the default handler.
  53.  */
  54. [scriptable, uuid(a49813a4-98b7-4bdb-998c-8bd9704af0c0)]
  55. interface nsIExternalProtocolService : nsISupports
  56. {
  57.   /**
  58.    * Check whether a handler for a specific protocol exists.
  59.    * @param aProtocolScheme The scheme from a url: http, ftp, mailto, etc.
  60.    * @return true if we have a handler and false otherwise.
  61.    */
  62.   boolean externalProtocolHandlerExists(in string aProtocolScheme);
  63.  
  64.   /**
  65.    * Check whether a handler for a specific protocol is "exposed" as a visible
  66.    * feature of the current application.
  67.    *
  68.    * An exposed protocol handler is one that can be used in all contexts.  A
  69.    * non-exposed protocol handler is one that can only be used internally by the
  70.    * application.  For example, a non-exposed protocol would not be loaded by the
  71.    * application in response to a link click or a X-remote openURL command.
  72.    * Instead, it would be deferred to the system's external protocol handler.
  73.    */
  74.   boolean isExposedProtocol(in string aProtocolScheme);
  75.  
  76.   /**
  77.    * Used to load a url via an external protocol handler (if one exists)
  78.    * @param aURL The url to load
  79.    */
  80.   void loadUrl (in nsIURI aURL);
  81.  
  82.   /**
  83.    * Used to load a URI via an external application. Might prompt the user for
  84.    * permission to load the external application. Replaces loadUrl()
  85.    *
  86.    * @param aURI    The URI to load
  87.    * @param aPrompt If null we grab one from windowwatcher if we need it
  88.    */
  89.   void loadURI(in nsIURI aURI, in nsIPrompt aPrompt);
  90.  
  91.   /**
  92.    * Gets a human-readable description for the application responsible for
  93.    * handling a specific protocol.
  94.    *
  95.    * @param aScheme The scheme to look up. For example, "mms".
  96.    *
  97.    * @throw NS_ERROR_NOT_IMPLEMENTED
  98.    *        If getting descriptions for protocol helpers is not supported
  99.    * @throw NS_ERROR_NOT_AVAILABLE
  100.    *        If no protocol helper exists for this scheme, or if it is not
  101.    *        possible to get a description for it.
  102.    */
  103.   AString getApplicationDescription(in AUTF8String aScheme);
  104. };
  105.